package com.d2.modules.system.category.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.d2.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author mayihua
 */
@EqualsAndHashCode(callSuper = true)
@TableName("sys_category")
@Data
public class Category extends BaseEntity {
    private String name;
    private String code;
    private Long pid;

    @TableField(exist = false)
    private List<Category> children;

//    @TableField(exist = false)
    private Integer hasChildren;
}
